package com.navi.loaddata.core.oracleEntity;

import com.navi.loaddata.core.oracleEntity.array.EtlArrayGlassV;
import com.navi.loaddata.core.oracleEntity.cell1.EtlCellComponentV;
import com.navi.loaddata.core.oracleEntity.cell2.EtlCell2ChipV;
import com.navi.loaddata.core.oracleEntity.cf.EtlCfGlassV;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * Created by Jay on 2018/3/27.
 */

@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface EtlGlassVMapper {

    EtlGlassVMapper INSTANCE = Mappers.getMapper(EtlGlassVMapper.class);

    EtlArrayGlassV etlGlassToArray(EtlGlassV glassVMapper);
    List<EtlArrayGlassV> etlGlassToArray(List<EtlGlassV> list);


    @Mapping(target = "groupId", source = "lotId")//属性名不一致映射
    EtlCfGlassV etlGlassToCf(EtlGlassV glassVMapper);
    List<EtlCfGlassV> etlGlassToCf(List<EtlGlassV> list);

    @Mapping(target = "componentId",source = "glassId")//属性名不一致映射
    @Mapping(target = "componentEndTime",source = "glassEndTime")//属性名不一致映射
    @Mapping(target = "componentStartTime", source = "glassStartTime")//属性名不一致映射
    @Mapping(target = "groupId", source = "lotId")//属性名不一致映射
    EtlCellComponentV etlGlassToCell1(EtlGlassV glassVMapper);
    List<EtlCellComponentV> etlGlassToCell1(List<EtlGlassV> list);

    @Mapping(target = "chipEndTime", source = "glassEndTime")//属性名不一致映射
    @Mapping(target = "chipStartTime", source = "glassStartTime")//属性名不一致映射
    @Mapping(target = "groupId", source = "lotId")//属性名不一致映射
    EtlCell2ChipV etlGlassToCell2(EtlGlassV glassVMapper);
    List<EtlCell2ChipV> etlGlassToCell2(List<EtlGlassV> list);

}
